package thinking.java.initalization.and.clean.up.example;

/**
 * 创建一个类，它包含一个未初始化的String 引用。验证该引用被Java初始化成了null
 * @author GaoFeng
 * @date 2019/12/31 16:08
 */
public class Ex_5_1_1_AssertStringInit {
    public static void main(String[] args) {
        // 创建对象
        AttributeInitTest initTest = new AttributeInitTest();
        System.out.println("s is null ? " + (initTest.s == null));
    }

    static class AttributeInitTest {
       String s;

       AttributeInitTest() {

       }
    }
}
